package com.cndw.kungfu.model.activity.domain;

public class IntervalBroadcast implements Comparable<IntervalBroadcast> {

	/**
	 * 初始启动时间点
	 */
	private int initTime;
	/**
	 * 开始小时
	 */
	private int initHour;
	/**
	 * 开始分钟
	 */
	private int initMinute;
	/**
	 * 内部说明
	 */
	private String useTitle;
	/**
	 * 是否特别星期
	 */
	private int specialWeek;
	/**
	 * 限制特定的时间
	 */
	private String date;
	/**
	 * 广播内容
	 */
	private String content;

	public int getInitTime() {
		if (initTime == 0 && (initHour > 0 || initMinute > 0)) {
			initTime = initHour * 3600 + initMinute * 60;
		}
		return initTime;
	}

	public void setInitTime(int initTime) {
		this.initTime = initTime;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getSpecialWeek() {
		return specialWeek;
	}

	public void setSpecialWeek(int specialWeek) {
		this.specialWeek = specialWeek;
	}

	public int getInitHour() {
		return initHour;
	}

	public void setInitHour(int initHour) {
		this.initHour = initHour;
	}

	public int getInitMinute() {
		return initMinute;
	}

	public void setInitMinute(int initMinute) {
		this.initMinute = initMinute;
	}

	public String getUseTitle() {
		return useTitle;
	}

	public void setUseTitle(String useTitle) {
		this.useTitle = useTitle;
	}
	
	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	@Override
	public int compareTo(IntervalBroadcast o) {
		return  getInitTime() - o.getInitTime();
	}

}
